March 12, 2015
This is written while I’m working with ASP.net 5 beta 3. Things may change.
My first issue was that I was looking for a Jwt or OpenIdConnect middleware like the Auth0 quickstart says for old OWIN apps. Looks like that’s been merged into the plain old Microsoft.AspNet.Security.OAuthBearer NuGet package.
In project.json the add Nuget package to your dependencies:
"dependencies": {
...
"Microsoft.AspNet.Security.OAuthBearer": "1.0.0-beta3"
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerfactory)
{
app.UseOAuthBearerAuthentication(o =>
{
o.Authority = "YOUR AUTH0 DOMAIN.auth0.com";
o.Audience = "YOUR CLIENT ID GOES HERE";
});
//everything else from the template
}
FYI, This step may not be needed once everything is RTM, but it’s also the one that hung me up for a while.
Go to your Auth0 admin UI. Open the settings tab for the app you’ve created, and set the JsonWebToken Token Signature Algorithm to RS256.
Written by Eric Haskins, maker of things.